/*
 * @Description: 附件。入参第一个统一为baseInfo的store
 */
import globalMethods from '@/plugins/methods';
import { createDocumentList } from '../helper';

export default (useBaseInfo, printFrom) => {
    const attList = useBaseInfo.attachments.atts;
    const title = globalMethods.i18n('common.attachment.label');
    // if (printFrom === 'summary') {
    //     attNumber = getFileAttachmentNumber(0, 'showAttFile');
    // } else {
    //     attNumber = getFileAttachmentNumber(0, 'Att');
    // }

    if (attList.length) {
        return new PrintFragment(title, createDocumentList(attList, title));
    }
    return false;
};
